cmake_minimum_required(VERSION 3.0.2)
project(topic_pub_sub)

add_compile_options(-std=c++11)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
)

catkin_package(
 CATKIN_DEPENDS
)

include_directories(
  include
  ${catkin_INCLUDE_DIRS}
)

# 生成话题发布节点
add_executable(publisher src/publisher.cpp)
target_link_libraries(publisher 
  ${catkin_LIBRARIES}
)
# 生成话题订阅节点
add_executable(subscriber src/subscriber.cpp)
target_link_libraries(subscriber
  ${catkin_LIBRARIES}
)
